#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int nsum(int n)
{
	if (n == 1)
		return 1;
	return n * nsum(n - 1);
}
int nsum1(int i)
{
	int sum = 1;
	for (; i > 0; i--)
	{
		sum *= i;
	}
	return sum;
}
int main()
{
	printf("%d\n", nsum(4));
	printf("%d\n", nsum1(4));
	return 0;
}